home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: chang.unx.sas.com!walker
- From: walker@chang.unx.sas.com (Doug Walker)
- Subject: Re: Feeling very confused with SAS/C, NDK 3.1, etc.
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <DotxBJ.HqE@unx.sas.com>
- Date: Mon, 25 Mar 1996 15:21:19 GMT
- X-Nntp-Posting-Host: chang.unx.sas.com
- References: <1777.6656T1015T1276@mistral.co.uk>
- Organization: SAS Institute Inc.
-
- In article <1777.6656T1015T1276@mistral.co.uk>,
- Adam Atkinson <ghira@mistral.co.uk> wrote:
- >I've had NDK 3.1 thanks to some magazine cover disks for a couple of years
- >now. Should I replace the SAS/C 6.56 includes with the NDK3.1 ones, or
- >would this be dangerous?
-
- I don't know what is in the NDK (I've never seen it), but the include files
- provided with SAS/C fall into several categories:
-
- INCLUDE:#?.h ==> ANSI and SAS/C library header files
-
- INCLUDE:SYS ==> UNIX compatibility files
-
- INCLUDE:PRAGMAS ==> SAS/C supplied #pragma statements for system
- library calls
-
- INCLUDE:PROTOS ==> SAS/C supplied header files for each system
- library
-
- CXXINCLUDE: ==> C++ header files
-
- everything else ==> Commodore-supplied system header files
-
- I can't see how replacing this structure with the NDK structure GAINS
- you anything. You will probably LOSE the ability to do some things.
-
- >Since I'm (currently) writing only for my own consumption, I might as well
- >ignore the ANSI stuff and only use the amiga versions of everything. (The
- >Guru book, for instance, says it's usually bad to mix the two)
-
- Yes, and yes.
-
- >Where should I put third party includes. I've copied all the MUI includes
- >etc. into the sensible places in my includes directory, but I don't know if
- >this is what I'm expected to do. It seems more convenient than leaving 3rd
- >party includes scattered all over the place and having to specify exact
- >paths for them all the time.
-
- I suggest putting them somewhere else BESIDES in your SC:INCLUDE directory.
- The SC: directory should only include SAS/C-provided files, so if you need
- to reinstall the product, you will not have to figure out what parts came
- from the installation disks and what parts didn't. You can make INCLUDE:
- a multi-directory assign, or you can add the other directory to your SCOPTS
- file with an INCLUDEDIRECTORY option.
-
- >Should I construct a new GST to reflect my new setup? I was asked if I'd
- >like a big GST during the 6.50 setup, and I said yes. I get the impression
- >I may need to re-create it, but I'm really not sure.
-
- Personally, I create a new GST for every project, and set up my make file to
- build it. If you use the default GST, it will still work even if you add
- other header files, but it could be made faster if you include all the
- headers you are likely to use. BE CAREFUL when including headers: you cannot
- include header files that define functions or data. An inline function DOES
- count as a function definition. Data can be DECLARED in a header file that
- is included in a GST, but not DEFINED there. A data declaration has the
- "extern" keyword on it and no initializer value. You also need to be careful
- that the header included always defines things to the same value every time
- the file is compiled: i.e. the preprocessor can't change the way the file
- is compiled in different .c files.
-
- There is more information on this in the GST section of the Library Reference
- Manual.
-
- --Doug
- --
- *****
- *|_o_o|\\ Doug Walker walker@unx.sas.com
- *|. o.| ||
- | o |// Any opinions are mine, not those of SAS Institute, Inc.
- ======
-